'use client'

import { ReactNode } from "react"

import { logout } from "@/actions/logout"

const LogoutButton = ({ children }: { children?: ReactNode }) => {
    const onClick = () => logout()

    return (
        <span onClick={onClick} className="cursor-pointer">
            {children}
        </span>
    )
}

export default LogoutButton